﻿/*
 *FileName:      LoopScrollItem.cs
 *Author:        AUTHOR
 *Date:          2023/09/11 17:43:26
 *UnityVersion:  2021.3.15f1c1
 *Description:
*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
public class LoopScrollItem : MonoBehaviour
{
    [NonSerialized]
    public int dataIndex;
    [NonSerialized]
    public string itemName;
    public virtual void InitOnce(string itemName)
    {
        this.itemName = itemName;
    }
    public virtual void DataInit(int dataIndex, object data)
    {
        this.dataIndex = dataIndex;
        if (data != null)
        {
            gameObject.SetActive(true);
        }
        else
        {
            gameObject.SetActive(false);
        }
    }
    public void Clear()
    {
        gameObject.SetActive(false);
    }

}